ds_queue_head

Reads the value from the head of the queue.

语法:

ds_queue_head(id);


参数 描述
id The id of the data structure to read from.


Returns: Real, String, undefined


描述

This function will only read the first value of the queue (that which is "at the head"). It will not dequeue the value, meaning that it can still be read in the future by this function or the ds_queue_dequeue. If the queue is empty then the function will return the constant undefined, otherwise it will return the real or string value contained in the queue.


例如:

num = ds_queue_head(control_queue);

The above code will read the value from the queue indexed in the variable "control_queue" and store the return value in the variable "num".


上一页: Queues
下一页: ds_queue_tail
© Copyright YoYo Games Ltd. 2018 All Rights Reserved